﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Os.WebUI.Helpers
{
    public class CalendarioHelper
    {
        public static string ObterMesPorExtenso(int mes)
        {
            string mesPorExtenso = string.Empty;

            switch (mes)
            {
                case 1: mesPorExtenso = "Janeiro";
                    break;
                case 2: mesPorExtenso = "Fevereiro";
                    break;
                case 3: mesPorExtenso = "Março";
                    break;
                case 4: mesPorExtenso = "Abril";
                    break;
                case 5: mesPorExtenso = "Maio";
                    break;
                case 6: mesPorExtenso = "Junho";
                    break;
                case 7: mesPorExtenso = "Julho";
                    break;
                case 8: mesPorExtenso = "Agosto";
                    break;
                case 9: mesPorExtenso = "Setembro";
                    break;
                case 10: mesPorExtenso = "Outubro";
                    break;
                case 11: mesPorExtenso = "Novembro";
                    break;
                case 12: mesPorExtenso = "Dezembro";
                    break;
                default:
                    break;
            }

            return mesPorExtenso;
        }


        public static string ObterDiaDaSemanaPorExtenso(DayOfWeek diaDaSemana)
        {
            string diaDaSemanaPorExtenso = string.Empty;

            switch (diaDaSemana)
            {
                case DayOfWeek.Sunday: diaDaSemanaPorExtenso = "Domingo";
                    break;
                case DayOfWeek.Monday: diaDaSemanaPorExtenso = "Segunda";
                    break;
                case DayOfWeek.Tuesday: diaDaSemanaPorExtenso = "Terça";
                    break;
                case DayOfWeek.Wednesday: diaDaSemanaPorExtenso = "Quarta";
                    break;
                case DayOfWeek.Thursday: diaDaSemanaPorExtenso = "Quinta";
                    break;
                case DayOfWeek.Friday: diaDaSemanaPorExtenso = "Sexta";
                    break;
                case DayOfWeek.Saturday: diaDaSemanaPorExtenso = "Sábado";
                    break;
                default:
                    break;
            }

            return diaDaSemanaPorExtenso;
        }

        public static string ObterDiaDaSemanaAbreviadoPorExtenso(DayOfWeek diaDaSemana)
        {
            string diaDaSemanaPorExtenso = string.Empty;

            switch (diaDaSemana)
            {
                case DayOfWeek.Sunday: diaDaSemanaPorExtenso = "Dom.";
                    break;
                case DayOfWeek.Monday: diaDaSemanaPorExtenso = "Seg.";
                    break;
                case DayOfWeek.Tuesday: diaDaSemanaPorExtenso = "Ter.";
                    break;
                case DayOfWeek.Wednesday: diaDaSemanaPorExtenso = "Qua.";
                    break;
                case DayOfWeek.Thursday: diaDaSemanaPorExtenso = "Qui.";
                    break;
                case DayOfWeek.Friday: diaDaSemanaPorExtenso = "Sex.";
                    break;
                case DayOfWeek.Saturday: diaDaSemanaPorExtenso = "Sáb.";
                    break;
                default:
                    break;
            }

            return diaDaSemanaPorExtenso;
        }
        
        public static byte ObterQtdeDiaEmBranco(DayOfWeek diaDaSemana)
        {
            byte numeroDia = 0;

            switch (diaDaSemana)
            {
                case DayOfWeek.Monday: numeroDia = 0;
                    break;
                case DayOfWeek.Tuesday: numeroDia = 1;
                    break;
                case DayOfWeek.Wednesday: numeroDia = 2;
                    break;
                case DayOfWeek.Thursday: numeroDia = 3;
                    break;
                case DayOfWeek.Friday: numeroDia = 4;
                    break;
                case DayOfWeek.Saturday: numeroDia = 5;
                    break;
                case DayOfWeek.Sunday: numeroDia = 6;
                    break;
                default:
                    break;
            }

            return numeroDia;
        }
    }
}